import http from '../../utils/httpRequest'

export default {
  /**
   *
   * 通过categoryId和brand创建一个最简单的brand品牌，并将创建好的brandId在brandCategoryRelation表中与categoryId做好关联
   * */
  saveBrandAndBrandCategoryRelation (name, categoryId, descript, firstLetter, logo, showStatus, sort) {
    return http({
      url: `/pms/brand/saveBrandAndBrandCategoryRelation`,
      method: 'post',
      data: {
        // "brandId": 0,
        descript,
        firstLetter,
        logo,
        name,
        showStatus,
        sort,
        categoryId,
      }
    })
  },

  getBrandByCategoryIdOrBrandName(categoryId,brandName,firstLetter,showStatus){
    return http({
      url:`/pms/brand/getBrandByCondition/`,
      method:'post',
      data:{
        "brandId": null,
        "categoryId": categoryId,
        "name": brandName,
        showStatus,
        firstLetter,
        // "sort": null
        // "descript": "string",
        // "logo": "string",
      }
    });
  }
}
